import React,{Component} from 'react'
import { Input,Radio,Button,Icon,Modal,Alert} from 'antd';
import {BrowserRouter as Router,Route,NavLink,Switch,Prompt,withRouter} from 'react-router-dom'
import * as api from '../api/getshangpinlist'
import header from './Header.module.css'
export default class Men extends Component{
	constructor(props) {
	    super(props)
		this.state={
			list:[]
		}
	}
	render(){
		return(
			<div className={header.dic}>
				{
					this.state.list.map((item)=>{
						return(
							<NavLink to={{pathname:"/particulars",state:{id:item.pid}}} key={item.pid}>

								<div key={item.pid} className={header.dl}>
									<dl>
										<dt><img src={item.pimg}/></dt>
										<dd>{item.pname}</dd>
										<dd>￥{item.pprice} <span>￥499.00</span></dd>
									</dl>
								</div>
							</NavLink>

						)
					})
				}
				
				
			</div>
		)
	}
	componentDidMount(){
		api.getshangpinlist({uid:28130}).then(data =>{
			// console.log(data.data.data)
			this.setState({list:data.data.data})
		})
	}
	
}
